import { http } from '@/utils/http/axios';

export interface NoticeInfo {
  id?: number;
  createTime?: string;
  title: string;
  editor: string;
  status: number;
  content: string;
  notifier: any[];
}
/**
 * @description: 通知列表
 */
export function getNoticeList(params) {
  return http.request({
    url: '/info/notice/page',
    method: 'GET',
    params,
  });
}
/**
 * @description: 通知详情
 */
export function getNoticeInfo(params) {
  return http.request({
    url: '/info/notice/info',
    method: 'GET',
    params,
  });
}
/**
 * @description: 通知新增
 */
export function createNotice(data) {
  return http.request({
    url: '/info/notice',
    method: 'POST',
    data,
  });
}
/**
 * @description: 通知修改
 */
export function updateNotice(data) {
  return http.request({
    url: '/info/notice',
    method: 'PUT',
    data,
  });
}
/**
 * @description: 删除通知
 */
export function deleteNotice(params) {
  return http.request({
    url: '/info/notice',
    method: 'DELETE',
    params,
  });
}
/**
 * @description: 通知人员列表
 */
export function getNoticeUserList(params) {
  return http.request({
    url: '/info/notice/userList',
    method: 'GET',
    params,
  });
}
/**
 * @description: 通知首页通知列表
 */
export function getHomeNoticeList() {
  return http.request({
    url: '/info/notice/list',
    method: 'GET',
  });
}
